home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
PInterfaces
/
SystemNotification.p
< prev
next >
Wrap
Text File
|
1996-05-01
|
4KB
|
152 lines
{
File: SystemNotification.p
Contains: System Notification Service Interfaces.
Version: Technology: System 8
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
}
{$IFC UNDEFINED UsingIncludes}
{$SETC UsingIncludes := 0}
{$ENDC}
{$IFC NOT UsingIncludes}
UNIT SystemNotification;
INTERFACE
{$ENDC}
{$IFC UNDEFINED __SYSTEMNOTIFICATION__}
{$SETC __SYSTEMNOTIFICATION__ := 1}
{$I+}
{$SETC SystemNotificationIncludes := UsingIncludes}
{$SETC UsingIncludes := 1}
{$IFC UNDEFINED __KERNEL__}
{$I Kernel.p}
{$ENDC}
{$IFC UNDEFINED __FILEMANAGERTYPES__}
{$I FileManagerTypes.p}
{$ENDC}
{$IFC UNDEFINED __NAMEREGISTRY__}
{$I NameRegistry.p}
{$ENDC}
{$PUSH}
{$ALIGN POWER}
{$LibExport+}
{$IFC FOR_SYSTEM8_PREEMPTIVE }
{
* basic notification data structures and constants
}
CONST
kSNSMatchAnyService = '****';
kSNSMatchAnyKind = '****';
TYPE
SNSService = OSType;
SNSKind = OSType;
SNSSubjectVariantPtr = ^SNSSubjectVariant;
SNSSubjectVariant = RECORD
CASE INTEGER OF
0: (
genericSubject: PACKED ARRAY [0..255] OF CHAR;
);
1: (
nsObject: ObjectID;
);
2: (
fsPersistence: FSObjectPersistentReference;
);
3: (
fsObject: FSEventObjectSubject;
);
4: (
fsObjectProperty: FSEventObjectPropertySubject;
);
5: (
nameRegistryEntry: RegEntryRef;
);
END;
SNSSubjectPtr = ^SNSSubject;
SNSSubject = RECORD
subjectLength: ByteCount;
subject: SNSSubjectVariant;
END;
SNSNotificationHeaderPtr = ^SNSNotificationHeader;
SNSNotificationHeader = RECORD
service: SNSService;
kind: SNSKind;
subject: SNSSubject;
subscriberRefCon: Ptr;
infoLength: ByteCount;
END;
SNSNotificationPtr = ^SNSNotification;
SNSNotification = RECORD
header: SNSNotificationHeader;
info: SInt8;
END;
{
* producer data structures and constants
}
CONST
kSNSFireAndForgetNotification = 0;
kSNSRequireAllConsumersSucceed = $00000001;
kSNSRequireOneConsumerSucceed = $00000002;
TYPE
SNSProduceOptions = OptionBits;
SNSDistributorID = ObjectID;
{
* consumer data structures and constants
}
SNSConsumerID = ObjectID;
SNSConsumerName = OSType;
{
* producer interface
}
FUNCTION SNSFindDistributor(service: SNSService; kind: SNSKind; createDistributor: BOOLEAN; VAR distributor: SNSDistributorID): OSStatus; C;
FUNCTION SNSProduce(distributor: SNSDistributorID; notification: UNIV Ptr; notificationLength: ByteCount; subject: UNIV Ptr; subjectLength: ByteCount; options: SNSProduceOptions): OSStatus; C;
FUNCTION SNSProduceAsync(distributor: SNSDistributorID; notification: UNIV Ptr; notificationLength: ByteCount; subject: UNIV Ptr; subjectLength: ByteCount; options: SNSProduceOptions; completion: KernelNotificationPtr): OSStatus; C;
{
* consumer and subscription interface
}
FUNCTION SNSCreateConsumer(name: SNSConsumerName; maxPending: ItemCount; VAR consumer: SNSConsumerID): OSStatus; C;
FUNCTION SNSDeleteConsumer(consumer: SNSConsumerID): OSStatus; C;
FUNCTION SNSSubscribe(consumer: SNSConsumerID; service: SNSService; kind: SNSKind; subject: UNIV Ptr; subjectLength: ByteCount; refCon: UNIV Ptr): OSStatus; C;
FUNCTION SNSUnsubscribe(consumer: SNSConsumerID; service: SNSService; kind: SNSKind; subject: UNIV Ptr; subjectLength: ByteCount): OSStatus; C;
FUNCTION SNSHold(consumer: SNSConsumerID; service: SNSService; kind: SNSKind; subject: UNIV Ptr; subjectLength: ByteCount): OSStatus; C;
FUNCTION SNSUnhold(consumer: SNSConsumerID; service: SNSService; kind: SNSKind; subject: UNIV Ptr; subjectLength: ByteCount): OSStatus; C;
FUNCTION SNSFlush(consumer: SNSConsumerID; service: SNSService; kind: SNSKind; subject: UNIV Ptr; subjectLength: ByteCount): OSStatus; C;
FUNCTION SNSConsume(consumer: SNSConsumerID; notification: SNSNotificationPtr; maxSize: ByteCount): OSStatus; C;
FUNCTION SNSConsumeAsync(consumer: SNSConsumerID; notification: SNSNotificationPtr; maxSize: ByteCount; completion: KernelNotificationPtr): OSStatus; C;
{$ENDC}
{$ALIGN RESET}
{$POP}
{$SETC UsingIncludes := SystemNotificationIncludes}
{$ENDC} {__SYSTEMNOTIFICATION__}
{$IFC NOT UsingIncludes}
END.
{$ENDC}